The present inventive concept relates to memory systems, and more particularly to flash memory systems supporting flash memory defragmentation operations. The inventive concept also relates to methods of defragmenting flash memory.
Unlike memory systems incorporating a hard disk, a flash memory system does not support a direct data overwrite operation. Instead, flash memory systems must perform an erase operation and then perform a write operation to effectively implement a rewrite or overwrite operation for data stored in the constituent flash memory. As is conventionally understood, flash memory performs erase operations on a memory block basis, and such operations typically require a lengthy period of execution time. These characteristics of flash memory make it difficult to directly apply a conventional hard disk file system to a flash memory system. That is, file systems and related data management approaches applied to memory systems incorporating a hard disk can not be applied to flash memory systems without significant adaptation. One common approach to the adaptation of legacy hard disk files systems to emerging flash memory systems (e.g., solid state drives or SSDs) requires the use of a so-called flash translation layer (FTL). The FTL is middleware that essentially translates the commands and operations defined within a hard disk file system into commands and operations compatible with a flash memory system. Thus, from the point of view of a host device generating and receiving data from the memory system, the FTL enables data to be read from and written to the flash memory system as if it were a conventional hard disk system.
Available memory space is valuable commodity within electronic systems and devices. The continuous random use of any memory space leads to some degree of memory space fragmentation. That is, the processes of writing data (or data files) to memory, deleting data from memory, and overwriting stored data results in fragmentation of available memory space. Too much fragmentation of memory space can slow the overall operation of the host device.
Hence, memory defragmentation (or defrag) is an operation that reduces the degree of fragmentation within a memory, or within a file system controlling the allocation of space within a memory. Defrag operations are conventionally applied to the hard disk of memory systems. Defrag improves operating speed of a memory system by reorganizing, concatenating and/or compacting fragmented data (or fragmented data files) within memory. Periodic defragmentation helps maintain the optimal performance of memory systems and constituent data storage media by reducing the file system overhead and data search time caused by excessive fragmentation.